﻿<UserControl x:Class="ETRobocon.RaceTraking.GameManagement.RoundMgmtUserControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:src="clr-namespace:ETRobocon.RaceTraking.GameManagement"
    Height="304" Width="600">
    <UserControl.Resources>
        <src:WSContestList x:Key="contestList"/>
        <src:WSTeamEntry x:Key="inCourceRunner"/>
        <src:WSTeamEntry x:Key="outCourceRunner"/>
        <Style TargetType="StackPanel">
            <Setter Property="DockPanel.Dock" Value="Left"/>
            <Setter Property="Margin" Value="10,0,10,0"/>
        </Style>
        <Style TargetType="ListBox">
            <Setter Property="Height" Value="100"/>
        </Style>
        <Style TargetType="Label">
            <Setter Property="FontSize" Value="12"/>
        </Style>
        <Style TargetType="Button">
            <Setter Property="Margin" Value="5,5,5,5"/>
        </Style>
    </UserControl.Resources>
 <!--   <Border BorderThickness="2" BorderBrush="Chocolate"> -->
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="130"/>
            <RowDefinition Height="40"/>
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid Grid.Row="0" DataContext="{Binding Source={StaticResource contestList}}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition/>
                <ColumnDefinition/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="24"/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Label Grid.Column="0" Grid.Row="0">Contests</Label>
            <ListBox Grid.Column="0" Grid.Row="1" ItemsSource="{Binding}" IsSynchronizedWithCurrentItem="True"></ListBox>
            <Label Grid.Column="1" Grid.Row="0" Content="{Binding Path=Name}"></Label>
            <ListBox Grid.Column="1" Grid.Row="1" Name="listBoxGame" ItemsSource="{Binding Path=Games}" IsSynchronizedWithCurrentItem="True"></ListBox>
            <Label Grid.Column="2" Grid.Row="0" Content="{Binding Path=Games/Name}"></Label>
            <ListBox Grid.Column="2" Grid.Row="1" Name="listBoxRound" ItemsSource="{Binding Path=Games/Rounds}" IsSynchronizedWithCurrentItem="True" VerticalAlignment="Bottom"></ListBox>
        </Grid>
<!--        <DockPanel Grid.Row="0" DataContext="{Binding Source={StaticResource contestList}}" >
        <StackPanel>
            <Label>Contests</Label>
            <ListBox ItemsSource="{Binding}" IsSynchronizedWithCurrentItem="True"></ListBox>
        </StackPanel>
        <StackPanel>
            <Label Content="{Binding Path=Name}"></Label>
            <ListBox Name="listBoxGame" ItemsSource="{Binding Path=Games}" IsSynchronizedWithCurrentItem="True"></ListBox>
        </StackPanel>
        <StackPanel>
            <Label Content="{Binding Path=Games/Name}"></Label>
            <ListBox Name="listBoxRound" ItemsSource="{Binding Path=Games/Rounds}" IsSynchronizedWithCurrentItem="True" VerticalAlignment="Bottom"></ListBox>
        </StackPanel>
    </DockPanel> -->
        <DockPanel Grid.Row="1">
            <Button Name="buttonRoundStart" Click="buttonRoundStart_Click" DockPanel.Dock="Left" Width="75" Height="30">Start</Button>
            <Label Content="&lt;- Round Control -&gt;" DockPanel.Dock="Left" FontSize="14" FontWeight="Bold"/>
            <Button Name="buttonRoundCount" Click="buttonRoundCount_Click" DockPanel.Dock="Right" Width="75" Height="30">Continue</Button>
        </DockPanel>
        <Grid Grid.Row="2">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
                <RowDefinition Height="40"/>
            </Grid.RowDefinitions>
            <Label Content="Current Round Information" FontWeight="Bold" FontSize="14" Grid.Row="0" Grid.ColumnSpan="2"/>
            <Label Content="GameID" Grid.Column="0" Grid.Row="1"/>
            <TextBlock Name="textBlockGameID" Grid.Column="1" Grid.Row="1"></TextBlock>
                <StackPanel Orientation="Horizontal" Grid.Row="2" Grid.Column="0" Grid.ColumnSpan="2">
                    <Label Content="Game Name:" />
            <TextBlock Name="textBlockGameName"></TextBlock>
            <Label Content=",Round No:" />
            <TextBlock Name="textBlockRoundNo"></TextBlock>
                    </StackPanel>
        </Grid>
    </Grid>
 <!--       </Border> -->
</UserControl>
